---
title: "LibreChat"
---

DBHub can be integrated with [LibreChat](https://www.librechat.ai/) using either **stdio** or **Streamable HTTP** transport.

## Configuration Options

<Tabs>
  <Tab title="stdio">
    ```yaml librechat.yaml
    mcpServers:
      dbhub:
        type: stdio
        command: npx
        args:
          - -y
          - "@bytebase/dbhub"
          - "--dsn"
          - "postgres://user:password@localhost:5432/dbname"
        timeout: 60000
    ```

    For demo mode:

    ```yaml librechat.yaml
    mcpServers:
      dbhub:
        type: stdio
        command: npx
        args:
          - -y
          - "@bytebase/dbhub"
          - "--demo"
        timeout: 60000
    ```
  </Tab>

  <Tab title="Streamable HTTP">
    ```yaml librechat.yaml
    mcpServers:
      dbhub:
        type: streamable-http
        url: http://host.docker.internal:8080/mcp
        timeout: 60000
    ```

    <Note>
      **Docker Networking:** When LibreChat runs in Docker (e.g., with docker-compose), use `host.docker.internal:8080` to connect to DBHub running on your host machine. This is Docker's special DNS name that resolves to the host's IP address.

      For native installations, use `http://localhost:8080/mcp` instead.
    </Note>
  </Tab>
</Tabs>

## References

- [LibreChat MCP Documentation](https://www.librechat.ai/docs/configuration/librechat_yaml/object_structure/mcp_servers)